$(function () {
    layui.use(['jquery'], function () {
        let $ = layui.jquery;
        findById();

        function findById() {
            let id = sessionStorage.getItem("commentId");
            let res = myAjax("/back/comment/id", {id: id}, "get");
            if (res != null) {
                if (res.data != null) {
                    setProductData(res.data);
                }
            }
        }

        function setProductData(data) {
            //console.log(data);
            $("#name").html(data.username);
            $("#appellation").html(data.appellation);
            $("#email").html(data.email);
            $("#title").html(data.title);
            $("#content").html(data.content);
        }
    });
})